<template>
	<view class="tabbar-body">
		<view class="tabbar">
			<view v-for = "(item,key) in list" @tap="toPage(key)">
				<view style="height: 15upx;"></view>
				<i class="icon" v-html='item.icon' :style="way == key ? 'color:#409EFF' : 'color:#666666'"></i>
				<view :style="way == key ? 'color:#409EFF' : 'color:#666666'">{{item.name}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				way : this.$attrs.way,
				list : [
					{
						icon : '&#xe601;',
						name : '资金'
					},
					{
						icon : '&#xeee1;',
						name : '功能'
					}
				]
			}
		},
		methods:{
			toPage(key){
				this.$emit('click-event',key);
			}
		}
	}
</script>

<style>
	.tabbar-body{position: fixed;width: 100%;bottom: 0;z-index: 9;}
	.tabbar{height:120upx;background: #F8F8F8;}
	.tabbar > view{float: left;width: 50%;text-align: center;font-size: 30upx;color:#666666}
	.tabbar .icon{font-size: 50upx;color:#666666}
</style>
